Optimal. Leaf size=138 \[ -\frac {3 a^2 \tanh ^{-1}\left (\frac {\sqrt {a+b} \sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}}\right )}{8 (a+b)^{5/2} f}-\frac {(5 a+2 b) \cot (e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{8 (a+b)^2 f}-\frac {\cot ^3(e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{4 (a+b) f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {4219, 481, 541,
12, 385, 213} \begin {gather*} -\frac {3 a^2 \tanh ^{-1}\left (\frac {\sqrt {a+b} \sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}}\right )}{8 f (a+b)^{5/2}}-\frac {\cot ^3(e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{4 f (a+b)}-\frac {(5 a+2 b) \cot (e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{8 f (a+b)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 213
Rule 385
Rule 481
Rule 541
Rule 4219
Rubi steps
\begin {align*} \int \frac {\csc ^5(e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx &=\frac {\text {Subst}\left (\int \frac {x^4}{\left (-1+x^2\right )^3 \sqrt {a+b x^2}} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac {\cot ^3(e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{4 (a+b) f}-\frac {\text {Subst}\left (\int \frac {-a-2 (2 a+b) x^2}{\left (-1+x^2\right )^2 \sqrt {a+b x^2}} \, dx,x,\sec (e+f x)\right )}{4 (a+b) f}\\ &=-\frac {(5 a+2 b) \cot (e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{8 (a+b)^2 f}-\frac {\cot ^3(e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{4 (a+b) f}-\frac {\text {Subst}\left (\int -\frac {3 a^2}{\left (-1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\sec (e+f x)\right )}{8 (a+b)^2 f}\\ &=-\frac {(5 a+2 b) \cot (e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{8 (a+b)^2 f}-\frac {\cot ^3(e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{4 (a+b) f}+\frac {\left (3 a^2\right ) \text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\sec (e+f x)\right )}{8 (a+b)^2 f}\\ &=-\frac {(5 a+2 b) \cot (e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{8 (a+b)^2 f}-\frac {\cot ^3(e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{4 (a+b) f}+\frac {\left (3 a^2\right ) \text {Subst}\left (\int \frac {1}{-1-(-a-b) x^2} \, dx,x,\frac {\sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}}\right )}{8 (a+b)^2 f}\\ &=-\frac {3 a^2 \tanh ^{-1}\left (\frac {\sqrt {a+b} \sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}}\right )}{8 (a+b)^{5/2} f}-\frac {(5 a+2 b) \cot (e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{8 (a+b)^2 f}-\frac {\cot ^3(e+f x) \csc (e+f x) \sqrt {a+b \sec ^2(e+f x)}}{4 (a+b) f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.17, size = 78, normalized size = 0.57 \begin {gather*} -\frac {a^2 (a+2 b+a \cos (2 (e+f x))) \, _2F_1\left (\frac {1}{2},3;\frac {3}{2};1-\frac {a \sin ^2(e+f x)}{a+b}\right ) \sec (e+f x)}{2 (a+b)^3 f \sqrt {a+b \sec ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(4982\) vs.
\(2(122)=244\).
time = 0.16, size = 4983, normalized size = 36.11
method | result | size |
default | \(\text {Expression too large to display}\) | \(4983\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.15, size = 515, normalized size = 3.73 \begin {gather*} \left [\frac {3 \, {\left (a^{2} \cos \left (f x + e\right )^{4} - 2 \, a^{2} \cos \left (f x + e\right )^{2} + a^{2}\right )} \sqrt {a + b} \log \left (\frac {2 \, {\left (a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {a + b} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) + a + 2 \, b\right )}}{\cos \left (f x + e\right )^{2} - 1}\right ) + 2 \, {\left (3 \, {\left (a^{2} + a b\right )} \cos \left (f x + e\right )^{3} - {\left (5 \, a^{2} + 7 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{16 \, {\left ({\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} f \cos \left (f x + e\right )^{4} - 2 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} f\right )}}, \frac {3 \, {\left (a^{2} \cos \left (f x + e\right )^{4} - 2 \, a^{2} \cos \left (f x + e\right )^{2} + a^{2}\right )} \sqrt {-a - b} \arctan \left (\frac {\sqrt {-a - b} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right )}{a + b}\right ) + {\left (3 \, {\left (a^{2} + a b\right )} \cos \left (f x + e\right )^{3} - {\left (5 \, a^{2} + 7 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{8 \, {\left ({\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} f \cos \left (f x + e\right )^{4} - 2 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} f\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\csc ^{5}{\left (e + f x \right )}}{\sqrt {a + b \sec ^{2}{\left (e + f x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 785 vs.
\(2 (122) = 244\).
time = 1.01, size = 785, normalized size = 5.69 \begin {gather*} -\frac {\sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a + b} {\left (\frac {{\left (a + b\right )} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}}{a^{2} + 2 \, a b + b^{2}} + \frac {3 \, {\left (3 \, a + b\right )}}{a^{2} + 2 \, a b + b^{2}}\right )} - \frac {24 \, a^{2} \arctan \left (-\frac {\sqrt {a + b} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a + b}}{\sqrt {-a - b}}\right )}{{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt {-a - b}} - \frac {12 \, a^{2} \log \left ({\left | {\left (\sqrt {a + b} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a + b}\right )} \sqrt {a + b} - a + b \right |}\right )}{{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt {a + b}} + \frac {4 \, {\left (2 \, {\left (\sqrt {a + b} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a + b}\right )}^{3} {\left (2 \, a^{2} - 2 \, a b - b^{2}\right )} - 3 \, {\left (\sqrt {a + b} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a + b}\right )}^{2} {\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt {a + b} - 2 \, {\left (3 \, a^{3} + a^{2} b - 2 \, a b^{2}\right )} {\left (\sqrt {a + b} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a + b}\right )} + {\left (5 \, a^{3} + 11 \, a^{2} b + 7 \, a b^{2} + b^{3}\right )} \sqrt {a + b}\right )}}{{\left ({\left (\sqrt {a + b} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a + b}\right )}^{2} - a - b\right )}^{2} {\left (a^{2} + 2 \, a b + b^{2}\right )}}}{64 \, f \mathrm {sgn}\left (\cos \left (f x + e\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\sin \left (e+f\,x\right )}^5\,\sqrt {a+\frac {b}{{\cos \left (e+f\,x\right )}^2}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________